#ifndef _AntDefine_H_
#define _AntDefine_H_

#include "AntType.h"

using namespace Ant;

struct ItemType
{
	enum
	{
		BombNumber		= 100,
		BombPower		= 101,
		Speed			= 102
	};
};

const float		USER_SPEED				= 0.02f;
const float		ADD_SPEED_ITEM			= 0.005f;
const uchar 	MAX_COUNT_ROOMUSER		= 4;
const ushort	MAX_COUNT_USER			= 1000;
const ushort 	MAX_COUNT_ROOM			= 500;
const uchar 	MAX_WIDTH_MAP			= 16;
const uchar 	MAX_HEIGHT_MAP			= 16;
const ushort	LIMIT_TIME_BOOMDELAY	= 3000;

#define CASE(X) case X: gs_Log.Write(__TFILE__, __LINE__, t(#X)); printf("TYPE : %s\n", #X)

#define TRANSSENDDATA(X, SENDPACKET)					\
	struct X* pkSendData = (struct X*)(SENDPACKET);	\
	(SENDPACKET)->type = X;								\
	(SENDPACKET)->len = sizeof(struct X)

#define MAKESENDDATA(X)								\
	struct X kSendData;								\
	kSendData.type = X;								\
	kSendData.len = sizeof(struct X)



#define MAKERECVDATA(X) struct X *pkData = (struct X *)pkHeader

#define MAKESTRUCT(S, V) const ushort S = V; struct S : public IHeader

#define ISERROR(X) pkHeader->usSize != sizeof(struct X)

#endif // _AntDefine_H_